import os

from matplotlib import pyplot as plt
from rs_trasformer import Compose,RandomColor
name='28.npy'# md随便选了几张结果连分割图都没有，倒霉
x1=r'data\image'
x2=r'data\edge'
x3=r'data\mask'
input=os.path.join(x1,name)#4波段数据
edge=os.path.join(x2,name) #边缘线分割图
mask=os.path.join(x3,name) #地块分割图

transformers=Compose([
        RandomColor(prob=0.5, alpha_range=[0.8, 1.2], beta_range=[-10, 10], band_num=4)
     ]
)
x=transformers(input,edge,mask)
print(x)
rgb_image1=x[0]
print(rgb_image1.shape)
rgb_image1=rgb_image1[:,:,:3]
rgb_image1=rgb_image1.astype('uint8')
plt.imshow(rgb_image1)
plt.axis('off')  # 关闭坐标轴
plt.title('RGB Image')
plt.show()
